Underbalanced drilling is a technique used to drill oil and gas wells. Unlike traditional over-balanced drilling, the wellbore pressure is kept lower than the formation pressure. Underbalanced drilling provides several advantages over over-balanced drilling. It reduces drilling fluid invasion of the wellbore, which decreases wellbore damage and can reduce clean-up time and improve recovery. It also allows the well to produce during drilling, which can increase the knowledge about the well itself. Computer modeling is an important tool for performing underbalanced drilling. An accurate and realistic computer model helps engineers to select drilling strings and operation parameters to achieve better performance and reduce the underbalanced drilling operation costs. One important UBD calculation is calculating the pressure drop through the drilling string and annulus. Conventionally, UBD calculations may be performed by suitable well planning software. However, conventional models are not satisfactory because they do not accurately model the pressure drops caused by the effect of tool joints in the drilling string and in the annulus. The cumulative effect of the chocking pressures caused by the tool joints can have a significant effect over the length of the wellbore. Therefore, there is a need in the art for tools that allow under balance drilling engineers a more accurate, realistic, and reliable under balance drilling analysis, taking into account the actual conditions in the drill string and casing.